<?php 
$data['page_selected'] = 'management';
$this->load->view('constants/header', $data);?>

<?php if($msg != '_') {?>
	<script type="text/javascript">
        alert('<?php echo $msg; ?>');	
    </script>
<?php } ?>

<div id="site_content">
	<?php $this->load->view('constants/sidebar'); ?> 
    <div id="content">
        <!-- insert the page content here -->
        <?php $this->load->view('management/menu'); ?>
        <br /><br /><br /><br />
  		<h3 align="center">Per&iacute;odos</h3>
        <a href="<?php echo base_url(); ?>management/new_period" title="Agregar per&iacute;odo">
        	<img src="<?php echo base_url().IMG; ?>add.png" width="100" height="100"/>
        </a>
        <table width="100%" align="center">
        	<thead>
                <th align="center">
                	C&oacute;digo
                </th>
                <th align="center" colspan="2"></th>
             </thead>
                <?php foreach($periods as $p){ ?>
                	<tr>
                    	<td align="center">
                        	<?php echo $p['cod_inst_edu_periodo']; ?>
                        </td>
                        <td align="center" width="49px">
                        	<a href="<?php echo base_url(); ?>management/edit_period/<?php echo $p['id_periodo']; ?>">
								<img src="<?php echo base_url().IMG ?>pencil_icon.png" width="16px" height="16px"/>
                            </a>
                        </td>
                        <td align="center" width="49px">
                        	<a href="<?php echo base_url(); ?>management/link_period/<?php echo $p['id_periodo']; ?>" title="Asociar per&iacute;odo a club">
								<img src="<?php echo base_url().IMG ?>link_icon.png" width="22px" height="22px"/>
                            </a>
                        </td>
                    </tr>
				<?php } ?>
        </table>
    </div>
</div>
<?php $this->load->view('constants/footer'); ?>